﻿<%
Class Model_Nav_Cate

	Public Table '数据表

	Private Sub Class_Initialize()
		Table = "nav_cate"
	End Sub

	'默认缺省方法为Dao，注意：此方法必不可少！
	Public Default Function Dao()
		Set Dao = App.Dao.New
		Dao.Table = Table
	End Function

	Public Function name_exists(name, id)
		Dim where : id = IntVal(id)
		where = "name='"& name &"' AND id<>"& id
		If Me.Dao.Where(where).Count()>0 Then
			name_exists = True
		Else
			name_exists = False
		End If
	End Function

End Class
%>